function deepClone(obj){
    let newObj = Array.isArray(obj)?[]:{}
    for(let item in obj){
        if(obj.hasOwnProperty(item)){
            if(typeof obj[item] =='object' && obj[item]!=null ){
                newObj[item]=deepClone(obj[item])
            }else{
                newObj[item]=obj[item]
            }
        }
    }
    return newObj
}